
const data_config = require("./data_config");


module.exports = {
  nav_name: '退货管理', //生成导航菜单
  module_name: 'return_goods_m',  //生成路径，必须与文件名相同
  api: `{
    return_page: commonPath + "/shop_order_return_goods/page", //分页
    return_changeState: commonPath + '/shop_order_return_goods/audit', //状态
    return_detail: cPath + "/shop_order_return_goods/get", //详情
  }`, //接口

  //列表
  table66: {
    // isGenerate: "false", //false表示不生成页面
    table_name: "r_goods_list",  //表页面名
    nav_name: "退货列表",  //导航名
    tipsText: "退货管理 >> 退货列表", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    pageApi: "API.return_goods_m.return_page",  //请求api
    // extraPageRequestParams: `
    //   courseId: this.$route.query.id,  //请求
    // `, //已有page和pageSize
    //获取列表页面
    tableData: [
      //普通
      { title: '序号', name: 'index', type: "normal" },
      { title: '商品名', name: 'goodName', type: "normal" },
      {
        title: '商品图片',
        name: 'imgUrl',
        type: "img",
        heightVal: "60",
        widthVal: "100",
      },

      { title: '商品名', name: 'price', type: "normal" },

      { title: '姓名', name: 'linkMan', type: "normal" },
      { title: '手机号', name: 'linkTel', type: "normal" },
      { title: '退货原因', name: 'returnGoodsReason', type: "normal" },

      { title: '审核备注', name: 'remarks', type: "normal" },

      {
        title: '状态',
        name: 'state',
        type: "opts",
        showName: "stateShow",
        showObj: `{
          "1": "通过",
          "2": "拒绝",
          "0": "申请",
        }`
      },

      { title: '修改时间', name: 'updateDate', type: "normal" },

    ],
    tableOpt: [
      {
        type: "view",
        text: "查看",
        request: false,
        jump: "/return_goods_m_return_detail"
      },
      {
        type: "changeState",
        text: "通过",
        request: true,
        url: "API.return_goods_m.return_changeState",
        requestType: 'post',
        params: `{id,  state: 1 }`, //必须为文本 状态 1上架 2下架
        methodNameTag: 'Open', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.state == '0'`,  //展示条件，没有就不传或置为空
      },
      {
        type: "changeState",
        text: "拒绝",
        request: true,
        url: "API.return_goods_m.return_changeState",
        requestType: 'post',
        params: `{id,  state: 2 }`, //必须为文本
        methodNameTag: 'Close', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.state == '0'`,  //展示条件，没有就不传或置为空
      },
    ],
    search: {
      contentArr: {
        input1: { labelName: '姓名', inputName: 'linkMan' },
        input2: { labelName: '手机号', inputName: 'linkTel' },
        input3: { labelName: '订单号', inputName: 'orderNo' },
        select1: {
          labelName: '性别',
          inputName: 'sex',  //输入绑定的变量
          selectOptsName: "sexOpts",
          selectOptsArr: `[
            { value: "0", label: "申请" },
            { value: "1", label: "通过" },
            { value: "2", label: "拒绝" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
      },
      //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "充值",
      //   request: false,
      //   jump: "/charge_m_charge_detail", //添加的跳转按钮
      // }
    },

  },

  //详情页面
  detail_page66: {
    // isGenerate: "false", //false表示不生成页面
    detail_page_name: "return_detail",
    detail_api: "API.return_goods_m.return_detail",
    request_params: `{
      id,
    }`,
    tipsText: "退货管理 >> 退货详情",
    formData: {
      // titleText: "请填写管理员相关信息",

      item1: {
        labelName: "审核人员名称",
        inputName: 'auditorName',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },

      item2: {
        labelName: "商品",
        inputName: 'goodName',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_2: {
        labelName: '商品图片',
        inputName: 'imgUrl',
        type: "img",
      },
      item2_3: {
        labelName: "姓名",
        inputName: 'linkMan',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_4: {
        labelName: "电话",
        inputName: 'linkTel',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_5: {
        labelName: "订单号",
        inputName: 'orderNo',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_5_2: {
        labelName: "商品价格",
        inputName: 'price',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_6: {
        labelName: "订单备注",
        inputName: 'remarks',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_7: {
        labelName: "退货原因",
        inputName: 'returnGoodsReason',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_8: {
        labelName: "订单id",
        inputName: 'shopOrderId',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item4: {
        labelName: '状态',
        inputName: 'state',
        type: "opts",
        optShowName: "stateShow",
        optShowStr: `{
          0: "申请",
          1: "通过",
          2: "拒绝"
        }`,
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item3: {
        labelName: "创建时间",
        inputName: 'createDate',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },

    },
  },



}

